﻿// This class is "generated" and will be overwritten.
// Your customizations should be made in RolesRecord.cs

using System;
using System.Collections;
using System.Data.SqlTypes;
using BaseClasses;
using BaseClasses.Data;
using BaseClasses.Data.SqlProvider;

namespace BUGLOG.Business
{

/// <summary>
/// The generated superclass for the <see cref="RolesRecord"></see> class.
/// </summary>
/// <remarks>
/// This class is not intended to be instantiated directly.  To obtain an instance of this class, 
/// use the methods of the <see cref="RolesTable"></see> class.
/// </remarks>
/// <seealso cref="RolesTable"></seealso>
/// <seealso cref="RolesRecord"></seealso>
public class BaseRolesRecord : PrimaryKeyRecord
{

	public readonly static RolesTable TableUtils = RolesTable.Instance;

	// Constructors
 
	protected BaseRolesRecord() : base(TableUtils)
	{
	}

	protected BaseRolesRecord(PrimaryKeyRecord record) : base(record, TableUtils)
	{
	}







#region "Convenience methods to get/set values of fields"

	/// <summary>
	/// This is a convenience method that provides direct access to the value of the record's Roles_.RoleID field.
	/// </summary>
	public ColumnValue GetRoleIDValue()
	{
		return this.GetValue(TableUtils.RoleIDColumn);
	}

	/// <summary>
	/// This is a convenience method that provides direct access to the value of the record's Roles_.RoleID field.
	/// </summary>
	public Int32 GetRoleIDFieldValue()
	{
		return this.GetValue(TableUtils.RoleIDColumn).ToInt32();
	}

	/// <summary>
	/// This is a convenience method that provides direct access to the value of the record's Roles_.Role field.
	/// </summary>
	public ColumnValue GetRoleValue()
	{
		return this.GetValue(TableUtils.RoleColumn);
	}

	/// <summary>
	/// This is a convenience method that provides direct access to the value of the record's Roles_.Role field.
	/// </summary>
	public string GetRoleFieldValue()
	{
		return this.GetValue(TableUtils.RoleColumn).ToString();
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.Role field.
	/// </summary>
	public void SetRoleFieldValue(ColumnValue val)
	{
		this.SetValue(val, TableUtils.RoleColumn);
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.Role field.
	/// </summary>
	public void SetRoleFieldValue(string val)
	{
		ColumnValue cv = new ColumnValue(val);
		this.SetValue(cv, TableUtils.RoleColumn);
	}
	/// <summary>
	/// This is a convenience method that provides direct access to the value of the record's Roles_.RoleDescription field.
	/// </summary>
	public ColumnValue GetRoleDescriptionValue()
	{
		return this.GetValue(TableUtils.RoleDescriptionColumn);
	}

	/// <summary>
	/// This is a convenience method that provides direct access to the value of the record's Roles_.RoleDescription field.
	/// </summary>
	public string GetRoleDescriptionFieldValue()
	{
		return this.GetValue(TableUtils.RoleDescriptionColumn).ToString();
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.RoleDescription field.
	/// </summary>
	public void SetRoleDescriptionFieldValue(ColumnValue val)
	{
		this.SetValue(val, TableUtils.RoleDescriptionColumn);
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.RoleDescription field.
	/// </summary>
	public void SetRoleDescriptionFieldValue(string val)
	{
		ColumnValue cv = new ColumnValue(val);
		this.SetValue(cv, TableUtils.RoleDescriptionColumn);
	}


#endregion

#region "Convenience methods to get field names"

	/// <summary>
	/// This is a property that provides direct access to the value of the record's Roles_.RoleID field.
	/// </summary>
	public Int32 RoleID
	{
		get
		{
			return this.GetValue(TableUtils.RoleIDColumn).ToInt32();
		}
		set
		{
			ColumnValue cv = new ColumnValue(value);
			this.SetValue(cv, TableUtils.RoleIDColumn);
		}
	}


	/// <summary>
	/// This is a convenience method that can be used to determine that the column is set.
	/// </summary>
	public bool RoleIDSpecified
	{
		get
		{
			ColumnValue val = this.GetValue(TableUtils.RoleIDColumn);
            if (val == null || val.IsNull)
            {
                return false;
            }
            return true;
		}
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.RoleID field.
	/// </summary>
	public string RoleIDDefault
	{
		get
		{
			return TableUtils.RoleIDColumn.DefaultValue;
		}
	}
	/// <summary>
	/// This is a property that provides direct access to the value of the record's Roles_.Role field.
	/// </summary>
	public string Role
	{
		get
		{
			return this.GetValue(TableUtils.RoleColumn).ToString();
		}
		set
		{
			ColumnValue cv = new ColumnValue(value);
			this.SetValue(cv, TableUtils.RoleColumn);
		}
	}


	/// <summary>
	/// This is a convenience method that can be used to determine that the column is set.
	/// </summary>
	public bool RoleSpecified
	{
		get
		{
			ColumnValue val = this.GetValue(TableUtils.RoleColumn);
            if (val == null || val.IsNull)
            {
                return false;
            }
            return true;
		}
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.Role field.
	/// </summary>
	public string RoleDefault
	{
		get
		{
			return TableUtils.RoleColumn.DefaultValue;
		}
	}
	/// <summary>
	/// This is a property that provides direct access to the value of the record's Roles_.RoleDescription field.
	/// </summary>
	public string RoleDescription
	{
		get
		{
			return this.GetValue(TableUtils.RoleDescriptionColumn).ToString();
		}
		set
		{
			ColumnValue cv = new ColumnValue(value);
			this.SetValue(cv, TableUtils.RoleDescriptionColumn);
		}
	}


	/// <summary>
	/// This is a convenience method that can be used to determine that the column is set.
	/// </summary>
	public bool RoleDescriptionSpecified
	{
		get
		{
			ColumnValue val = this.GetValue(TableUtils.RoleDescriptionColumn);
            if (val == null || val.IsNull)
            {
                return false;
            }
            return true;
		}
	}

	/// <summary>
	/// This is a convenience method that allows direct modification of the value of the record's Roles_.RoleDescription field.
	/// </summary>
	public string RoleDescriptionDefault
	{
		get
		{
			return TableUtils.RoleDescriptionColumn.DefaultValue;
		}
	}


#endregion
}

}
